#ifndef GLXTEST_H
#define GLXTEST_H

#include "test_common.h"

struct TRIANGLE
{
    unsigned short a, b, c;
};


class GLXObject : public SceneObject
{
public:
    GLXObject(SceneGraph* scene);
    virtual ~GLXObject();

    virtual void onUpdate(float dt);
    virtual void onRender();

    void loadObj(const char* filename);

private:
    int         vertex_data_size;
    int         index_data_size;
    vector3f*   vertices;
    vector2f*   texcoords;
    vector3f*   normals;
    int*        indices;
};


class GLXTest : public GLClient
{
public:
    GLXTest(GLEngine* engine);
    virtual ~GLXTest();

    virtual void onEnter();
	virtual void onLeave();
	virtual void onEvent(GLEvent e);
	virtual void onUpdate(float dt);
	virtual void onDraw();

private:
    GLCamera        camera;
    SceneGraph*     scene;
};

#endif // GLXTEST_H
